package com.ins.common.db;

import com.ins.common.utils.SecureUser;
import com.ins.model.entity.BaseEntity;
import com.mybatisflex.annotation.InsertListener;

/**
 * AppInsertListener
 *
 * @author aa
 * @version 1.0
 * @since 2024/5/23
 */
public class AppInsertListener implements InsertListener {

    @Override
    public void onInsert(Object entity) {
        BaseEntity en = (BaseEntity) entity;
        en.setCreateBy(SecureUser.getUserName());
        en.setUpdateBy(SecureUser.getUserName());

    }
}
